from django.urls import path
from django.contrib.auth.decorators import login_required
from home import views
from django.urls import converters
from django.contrib.auth import views as auth_views

app_name = "home"



urlpatterns = [
    path('', views.homepage, name='homepage'),   # 首页
    path('register/', views.register, name='register'), # 注册
    path('sms_send/', views.sms_send, name='sms_send'), # 发短信
    path('sms_check/', views.sms_check, name='sms_check'), # 检验短信
    path('register_handle/<hid>', views.register_handle, name='register_handle'), # 注册处理
    path('login/', views.login_handle, name='login'), # 登录及登录处理
    path('logout/', views.my_logout, name='logout'), # 退出登录
    path('sort/', views.sort, name='sort'), # 全部商品分类
    path('introduction/', views.introduction, name='introduction'), # 商品详情
    path('search/', views.search, name='search'), # 搜索
    path('shopcart/',login_required(views.shopcart), name='shopcart'), # 购物车
    path('pay/', login_required(views.pay), name='pay'), # 支付
    path('success/', views.success, name='success'), # 支付成功
]